﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace VGS {
    public partial class TypeOfPointForm : Form {
        public TypeOfPointForm(bool showServe) {
            InitializeComponent();

            if (showServe) buttonServe.Enabled = true;
            else buttonServe.Enabled = false;
        }

        public PointType? GetPointType() {
            DialogResult res = this.ShowDialog();

            switch (res) {
                case DialogResult.Yes:
                    return PointType.POINT_ATTACK;
                case DialogResult.No:
                    return PointType.POINT_DEFENSE;
                case DialogResult.OK:
                    return PointType.POINT_SERVE;
            }

            return null;
        }
    }
}
